<?php

namespace App\Transformers;


use App\Models\PutPeriod;
use League\Fractal\TransformerAbstract;

class FeedbackTransformer extends TransformerAbstract
{

    public function transform(PutPeriod $item)
    {
        return [
            'id' => $item['id'],
            'school_id' => $item['school_id'] ,
            'coach_id' => $item['coach_id'] ,
            'coachname'=>$item->coach->name,
            'coachphoto' => $item->coach->photo,
            'mobile' => $item->coach->mobile,
            'km' => $item['km'] ,
            'startime'=>$item['startime'],
            'endtime' => $item['endtime'],
            'money' => $item['money'],
            'paymode' => $item['paymode'],
            'quxiaotimes' => $item['operationtime'],
            'feedback' => $item['feedback'],
            'feedbacktime' => $item['feedbacktime'],
        ];
    }


}

